package com.whfc.fmam.entity.enums;

/**
 * @Description:
 * @author: qzexing
 * @version: 1.0
 * @date: 2020/4/26 15:55
 */
public enum WeighNoteState {

    //磅单状态:0-未出场 1-已出场 2-已退货 3-已作废
    NOT_OUT(0, "未出场"),

    OUTER(1, "已出场"),

    RETURNED(2, "已退货"),

    INVALID(3, "已作废");

    private Integer value;

    private String desc;

    WeighNoteState(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static WeighNoteState parseValue(Integer value) {
        switch (value) {
            case 0:
                return NOT_OUT;
            case 1:
                return OUTER;
            case 2:
                return RETURNED;
            case 3:
                return INVALID;
            default:
                return null;
        }
    }

}
